<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/8/11
 * Time: 11:31
 */
namespace app\admin\controller;

use think\Controller;
use think\Db;

class Index extends Controller
{
    public function index(){
        $start=Db::name('system')->where('sys_name','start')->value('price');
        $end=Db::name('system')->where('sys_name','end')->value('price');
        $this->assign([
            'start' => $start,
            'end' => $end,
        ]);
        return view();
    }
    public function modify(){
        Db::name('system')->where('sys_name','start')->setField('price',input('start'));
        Db::name('system')->where('sys_name','end')->setField('price',input('end'));
        $this->redirect('/admin/index/index');
    }

}